﻿sampler uImage0 : register(s0);
float3 uColor;
float3 uSecondaryColor;
float2 uScreenResolution;
float2 uScreenPosition;
float2 uTargetPosition;
float2 uDirection;
float uOpacity;
float uTime;
float uIntensity;
float uProgress;
float2 uImageOffset;
float uSaturation;
float4 uSourceRect;
float2 uZoom;
const float SQRT_2 = 1.41421356237;
float HeatStroke5(float low, float high)
{
    return uProgress * (high - low) + low;
}
float4 HeatStroke6(float2 coords : TEXCOORD0) : COLOR0
{
    float2 radialCoords = coords - float2(0.5, 0.5);
    float radialDistance = length(radialCoords);
    float factor = radialDistance * SQRT_2 * (uColor.r * HeatStroke5(0.6, 1.0) + uColor.g) * uColor.b;
    float4 HeatStrokeMult = float4(1.0 - factor * (1.0 - uSecondaryColor), 1.0);
    float4 HeatStrokeAdd = float4(factor * uSecondaryColor, factor);
    float4 color = tex2D(uImage0, coords) * HeatStrokeMult + 0.1 * HeatStrokeAdd;
    return color;
}
technique Technique1
{
    pass HeatStroke6
    {
        PixelShader = compile ps_2_0 HeatStroke6();
    }
}